﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace intelliEssay.Interop
{
    /// <summary>
    /// 单位换算
    /// </summary>
    public static class UnitConversion
    {
        /// <summary>
        /// 以毫米记录字符和数字之间自动加入的间距，字号为1
        /// </summary>
        public const double RelativeDistanceBetweenCharacterAndNumber = (25.4 / 72);
        /// <summary>
        /// 一个Point相当于毫米数
        /// </summary>
        public const double PointInMilimeter = 25.4 / 72;
        /// <summary>
        /// 用于换算对齐
        /// </summary>
        public const double SpacingToMilimeter = (1 / 20) * (25.4 / 72);
        /// <summary>
        /// 英尺到毫米
        /// </summary>
        public const double InchToMilimeter = 25.4;
        /// <summary>
        /// 英尺到1磅
        /// </summary>
        public const double InchToPoint = 72;
        /// <summary>
        /// Twillip到毫米，相当于1磅的1/20
        /// </summary>
        public const double TwillpToMilimeter = (25.4 / 72) / 20;
    }
}
